var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');


var schema = new mongoose.Schema({
    title: {type: String},
    content: {type: String},
    date: { type: Date, default: Date.now },
    cateId: {type: String},
    author: {type: String},
    id: {type: String},
    commentCount:{type:Number}
});

schema.plugin(mongoosePaginate);

module.exports =  mongoose.model('News',  schema); // Model.paginate()